import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询充值订单列表
export function listOrderWallet(data) {
  return request({
    url: '/order/wallet/orderWalletList',
    method: 'post',
    data: data
  })
}

// 查询充值订单详细
export function getOrderWallet(OrderNo) {
  return request({
    url: '/order/wallet/' + parseStrEmpty(OrderNo),
    method: 'get'
  })
}

// 新增充值订单
export function addOrderWallet(data) {
  return request({
    url: '/order/wallet',
    method: 'post',
    data: data
  })
}

// 修改充值订单
export function updateOrderWallet(data) {
  return request({
    url: '/order/wallet',
    method: 'put',
    data: data
  })
}

// 删除充值订单
export function delOrderWallet(OrderNo) {
  return request({
    url: '/order/wallet/' + OrderNo,
    method: 'delete'
  })
}

// 充值订单状态修改
export function changeOrderWalletStatus(OrderNo, status) {
  const data = {
    OrderNo,
    status
  }
  return request({
    url: '/order/wallet/orderWalletChangeStatus',
    method: 'put',
    data: data
  })
}